package
{
	import Graphics.TileSet;
	import Managers.SoundManager;
	import Utils.Camera;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Loader;
	import flash.display.LoaderInfo;
	import flash.events.Event;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.utils.getDefinitionByName;
	
	public class Level
	{
		private var game:Game;

		private var tileSheet:TileSet;
		//level id number
		private var id:int;
		//when you advance what level can you go to
		private var nextLevels:Array = new Array();
		//level name
		private var name:String;
		
		//level info
		private var rows:int = 100;
		private var columns:int = 100;
		private var tileSize:int = 100;
		private var width:int = rows * tileSize;
		private var height:int = columns * tileSize;
		private var world:Array = new Array();
		
		//background music for the level
		private var music:String;
		public var isMusicPlaying:Boolean = false;
		
		//public properties
		public function get GameLevel():Game{return game;}
		public function get Width():int{return width;}
		public function get Height():int{return height;}
		public function get TileSheet():TileSet{return tileSheet;}
		public function get World():Array{return world;}
		public function get Rows():int{return rows;}		
		public function get Columns():int{return columns;}
		public function get TileSize():int{return tileSize;}
		public function get Name():String{return name;}
		
		public function Level(game:Game)
		{
		}
		
		public function Initialize():void
		{
			
		}
		
		public function Load():void
		{
			
		}
		
		public function Update(deltaTime:int):void
		{
			
		}
		
		public function Draw(camera:Camera, bitmapData:BitmapData):BitmapData
		{
			return bitmapData;
		}
		
		public function PlayBackgroundMusic():void
		{
			isMusicPlaying = SoundManager.Instance.PlayMusic(music);
		}
		
		public function StopBackgroundMusic():void
		{
			isMusicPlaying = SoundManager.Instance.StopMusic();
		}
		
		public function PauseMusic():void
		{
			isMusicPlaying = SoundManager.Instance.PauseMusic();
		}
	}
}